package com.medata.repository;

import com.medata.dataObject.LogMakeDocument;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.sql.Timestamp;

/**
 * @author ：zb
 * @description：
 */

public interface LogMakeDocumentRepository extends JpaRepository<LogMakeDocument,Integer> {
//    @Query(value = "select * from LogMakeDocument where (logtime >= ? and logtime <= ? and actionid = ?)",nativeQuery = true)
//    List<LogMakeDocument> findByLogtimeBetweenAndActionid(Timestamp startTime,Timestamp endTime,Integer id);

    Page<LogMakeDocument> findByLogtimeBetweenAndActionidOrderByLogtimeDesc(Timestamp startTime, Timestamp endTime, Integer id, Pageable pageable);

    void deleteByLogtimeBetweenAndActionid(Timestamp startTime,Timestamp endTime,Integer id);



}

